<?xml version="1.0" encoding="utf-8"?>

<div xmlns="http://www.w3.org/1999/xhtml" component="$UI/system/components/justep/window/window" design="device:mobile"
  xid="window">  
  <div component="$UI/system/components/justep/model/model" xid="model" style="left:18px;top:83px;height:244px;">
    <div component="$UI/system/components/justep/data/baasData" xid="mainData"
      directDelete="true" autoLoad="true" idColumn="fID"
      onSaveCommit="saveCommit"
      queryAction="queryEquip_table" tableName="equip_table" url="/Highde/config_path_action" saveAction="saveEquip_table">
      <column label="ID" name="fID" type="String" xid="xid1"></column>
  <column label="设备名" name="fName" type="String" xid="xid2"></column>
  <column label="协议" name="fProtocol" type="String" xid="xid3"></column>
  <column label="设备地址" name="fModbusID" type="String" xid="xid4"></column>
  <column label="上级设备" name="fParentID" type="String" xid="xid5"></column>
  <column label="网关" name="fGatewayID" type="String" xid="xid6"></column>
  <column label="显示名" name="fDis" type="String" xid="xid7"></column>
  <column label="辅助参数" name="fOther" type="String" xid="xid8"></column>
  <column label="设备类型" name="fEquipType" type="String" xid="xid9"></column>
  <rule xid="rule1">
   <col name="fID" xid="ruleCol1">
    <calculate xid="calculate1">
     <expr xid="default2">justep.UUID.createUUID()</expr></calculate> </col> 
   <col name="fModbusID" xid="ruleCol2">
    <constraint xid="constraint1">
     <expr xid="default3">(/^[1-9][0-9]*$/).test($row.val(&quot;fModbusID&quot;)) &amp;&amp;(parseInt($row.val(&quot;fModbusID&quot;)) &lt; 247)</expr>
     <message xid="default4">MODBUS地址必须为小于247的数字</message></constraint> </col> 
   <col name="fName" xid="ruleCol3">
    <required xid="required1">
     <expr xid="default5">true</expr>
     <message xid="default6">请填写设备名</message></required> </col> 
   <col name="fEquipType" xid="ruleCol4">
    <required xid="required2">
     <expr xid="default7">true</expr>
     <message xid="default8">请选择设备类型</message></required> </col> </rule></div>
  <div component="$UI/system/components/justep/data/baasData" autoLoad="true" xid="equipTypeData" queryAction="queryEquip_type_table" saveAction="saveEquip_type_table" url="/Highde/type_action" tableName="equip_type_table" idColumn="fType"><column label="设备类型" name="fType" type="String" xid="default1"></column></div></div>  
  <span component="$UI/system/components/justep/windowReceiver/windowReceiver" xid="windowReceiver1" onReceive="windowReceiver1Receive"></span><div component="$UI/system/components/justep/panel/panel" class="x-panel x-full"> 
    <div class="x-panel-top"> 
      <div component="$UI/system/components/justep/titleBar/titleBar" title="设备信息"
        class="x-titlebar"> 
        <div class="x-titlebar-left"> 
          <a component="$UI/system/components/justep/button/button" label=""
            class="btn btn-link btn-only-icon" icon="icon-chevron-left" onClick="{operation:'window.close'}"
            xid="backBtn"> 
            <i class="icon-chevron-left"/>  
            <span/> 
          </a> 
        </div>  
        <div class="x-titlebar-title"><![CDATA[设备信息]]></div>  
        <div class="x-titlebar-right reverse"><a component="$UI/system/components/justep/button/button" class="btn btn-default" label="保存" xid="button1" onClick="{operation:'mainData.save'}">
   <i xid="i1"></i>
   <span xid="span1">保存</span></a>
  </div> 
      </div> 
    </div>  
    <div class="x-panel-content"> 
      <div component="$UI/system/components/justep/controlGroup/controlGroup"
        class="x-control-group" title="详细信息"> 
        <div class="x-control-group-title">详细信息</div> 
        <div component="$UI/system/components/justep/labelEdit/labelEdit" class="x-label-edit x-label20"> 
          <label class="x-label left" bind-text="$model.mainData.label('fName')"/>  
          <div class="x-edit">
            <input class="form-control" component="$UI/system/components/justep/input/input"
              data="mainData" bind-ref="mainData.ref('fName')"/>
          </div> 
        </div>
        <div component="$UI/system/components/justep/labelEdit/labelEdit" class="x-label-edit x-label20"> 
          <label class="x-label left" bind-text="$model.mainData.label('fModbusID')"/>  
          <div class="x-edit">
            <input class="form-control" component="$UI/system/components/justep/input/input"
              data="mainData" bind-ref="mainData.ref('fModbusID')"/>
          </div> 
        </div>
        <div component="$UI/system/components/justep/labelEdit/labelEdit" class="x-label-edit x-label20"> 
          <label class="x-label left" bind-text="$model.mainData.label('fDis')"/>  
          <div class="x-edit">
            <input class="form-control" component="$UI/system/components/justep/input/input"
              data="mainData" bind-ref="mainData.ref('fDis')"/>
          </div> 
        </div>
        <div component="$UI/system/components/justep/labelEdit/labelEdit" class="x-label-edit x-label20"> 
          <label class="x-label left" bind-text="$model.mainData.label('fEquipType')"/>  
          <div class="x-edit">
            <select component="$UI/system/components/justep/select/select" bind-optionsCaption="请选择..." class="form-control" xid="select2" bind-ref='$model.mainData.ref("fEquipType")' bind-labelRef='$model.mainData.ref("fEquipType")' bind-optionsValue="fType" bind-optionsLabel="fType" bind-options="equipTypeData"></select></div> 
        </div>
      </div> 
    </div> 
  </div> 
</div>